import request from "@/utils/request";
import {lToMl, yuanToFen} from "@/utils/unitUtil";

//查询加注站是否被绑定
export function SelectFuserId(data) {
  return request({
    url: 'api/station/is-bind-station?userId=' + data,
    method: 'get',
  })
}

//查看未添加的加注机
export function selectCFillingFacilitList() {
  return request({
    url: 'api/station/selectCFillingFacilitList',
    method: 'get',
  })
}


//设置为加注员
export function setFuser(data) {
  return request({
    url: 'api/station/setFuser?userId=' + data,
    method: 'get',
  })
}

//绑定加注机到加注站
export function bindFacilit(stationId, facilitId) {
  return request({
    url: 'api/station/bindFacilit?stationId=' + stationId + '&facilitId=' + facilitId,
    method: 'get',
  })
}

//修改机器参数
export function updateStationStatus(data) {
  return request({
    url: 'api/station/updateStationStatus',
    method: 'post',
    data: data
  })
}


//修改加注机模式
export function updateFacilitMode(states, facilitId) {
  return request({
    url: 'api/station/updateStationMode',
    method: 'get',
    params: {
      States: states,
      facilitId: facilitId
    }
  })
}
